import request from '@/utils/request'


// 获取分类列表
export function findCategoryList(query) {
  return request({
    url: '/product/category/findCategoryList',
    method: 'get',
    params: query
  })
}


// 旧用户列表
export function tuserList(query) {
  return request({
    url: '/system/tuser/tuserList',
    method: 'get',
    params: query
  })
}

// 产品列表
export function findProductList(query) {
  return request({
    url: '/product/productinfo/findProductList',
    method: 'get',
    params: query
  })
}

// 规格列表
export function findSpecificationList(query) {
  return request({
    url: '/product/salesspecification/findSpecificationList',
    method: 'get',
    params: query
  })
}

// 组织列表
export function findOrganizationList(query) {
  return request({
    url: '/organization/organization/findOrganizationList',
    method: 'get',
    params: query
  })
}

// 库房列表
export function findStoreroom(query) {
  return request({
    url: '/store/storeroom/findStoreroom',
    method: 'get',
    params: query
  })
}

// 库房列表权限
export function findStoreroomListByPermiss(query) {
  return request({
    url: '/store/storeroom/findStoreroomListByPermiss',
    method: 'get',
    params: query
  })
}

// 库间列表
export function findStorehouse(query) {
  return request({
    url: '/store/storehouseroom/findStorehouse',
    method: 'get',
    params: query
  })
}

  // 品牌列表
  export function findBrandList(query) {
    return request({
      url: '/product/brand/findBrandList',
      method: 'get',
      params: query
    })
  }

  // 库存单位列表
  export function findStockUnitList(query) {
    return request({
      url: '/store/stockunit/findStockUnitList',
      method: 'get',
      params: query
    })
  }

    // 供应商列表
    export function findSupploerlist(query) {
      return request({
        url: '/organization/supplier/findSupploerlist',
        method: 'get',
        params: query
      })
    }

// 口杂标准列表
export function findQastandardList(query) {
  return request({
    url: '/quality/qastandard/findQastandardList',
    method: 'get',
    params: query
  })
}

// 质检标准列表
export function findQamainList(query) {
  return request({
    url: '/quality/qamain/findQamainList',
    method: 'get',
    params: query
  })
}

// 部门列表
export function getDepartmentList(query) {
  return request({
    url: '/organization/department/getDepartmentList',
    method: 'get',
    params: query
  })
}

// 客户列表
export function getCustomerList(query) {
  return request({
    url: '/customer/customer/getCustomerList',
    method: 'get',
    params: query
  })
}

// 流程操作节点列表
export function getSaleFlowNodes(query) {
  return request({
    url: '/flow/flowtempnode/getSaleFlowNodes',
    method: 'get',
    params: query
  })
}

// 通过指定权限查找库房
export function findDepartment(query) {
  return request({
    url: '/organization/department/findDepartment',
    method: 'get',
    params: query
  })
}

//查询权限
export function getPermissionDeflist(query) {
  return request({
    url: '/permission/permissiondef/getPermissionDeflist',
    method: 'get',
    params: query
  })
}

//查询流程名称
export function getFlowtemp(query) {
  return request({
    url: '/flow/flowtemp/getFlowtemp',
    method: 'get',
    params: query
  })
}

//查询消息模板
export function getSmsrule(query) {
  return request({
    url: '/flow/smsrule/getSmsrule',
    method: 'get',
    params: query
  })
}

//查询消息模板
export function getDict(dicttype) {
  return request({
    url: '/system/dict/getDicts?dicttype='+dicttype,
    method: 'get',
  })
}



//流程节点
export function getFlowtempnodeBy(query) {
  return request({
    url: '/flow/flowtempnode/getFlowtempnode',
    method: 'get',
    params: query
  })
}

//获取用户权限
export function getCurrPermis(query) {
  return request({
    url: '/permission/salespermission/getPermis',
    method: 'get',
    params: query
  })
}

//获取物流运费支付权限所包含的部门
export function getFareDepart(query) {
  return request({
    url: '/permission/salespermission/getDepsPermisByOrg',
    method: 'get',
    params: query
  })
}

//组织查询
export function getOrgs(query) {
  return request({
    url: '/getOrgs',
    method: 'get',
    params: query
  })
}
//根据组织查询库房
export function getSRoomByOrgId(query) {
  return request({
    url: '/getStoreRoomByOrgIdOrPermissions',
    method: 'get',
    params: query
  })
}

// 获取用户列表用于下拉
export function getUserList(query) {
  return request({
    url: '/system/user/getUserList',
    method: 'get',
    params: query
  })
}

//获取待处理流程节点
export function getPendingNode(query){
  return request({
    url:'/node/selectOnesUndoTasks',
    method:'get',
    params:query
  })
}

//单价展示权限
export function showPrice(query){
  return request({
    url:'/flow/flowtemp/showPrice',
    method:'get',
    params:query,
  })
}
